﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VideoNetApplication.Common;
using VideoNetApplication.Common.Service;

namespace VideoNetApplication
{
    public partial class ViewAllCoursesHtml : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            ShowCourse();
        }
        private void ShowCourse()
        {
            CourseService courseService = new CourseService();
            int outcount = 0;
            List<V_course> vCourse = courseService.GetCourse(SchoolId, pager.StartRecordIndex, pager.PageSize, out outcount);
            pager.RecordCount = outcount;
            repCourse.DataSource = vCourse;
            repCourse.DataBind();
        }
        protected void pager_PageChanged(object sender, EventArgs e)
        {
            ShowCourse();
        }
    }
}
